package com.kaibes.platform.file.client;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

import com.kaibes.web.json.JsonConfig;

@Configuration
public class FileClientConfig implements InitializingBean {
	
	@Autowired
	private JsonConfig jsonConfig;

    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

	@Override
	public void afterPropertiesSet() throws Exception {
		jsonConfig.addXssIgnore("aesKey");
		jsonConfig.addXssIgnore("aesIv");
	}

}
